package com.piece.core.framework.support.response;

import lombok.Builder;
import lombok.Data;
import java.io.Serializable;
import java.util.List;

/**
 * select2结果对象
 */
@Data
@Builder
public class Select implements Serializable {

    // 结果集
    private List<Entity> data;

    // 搜索值
    private String term;

    // 页码
    private int page;

    // 每次获取数量
    private int length;

    // 总记录数
    private int total;

    @Data
    public class Entity implements Serializable {
        private String id;
        private String text;

        public Entity(String id, String text) {
            this.id = id;
            this.text = text;
        }
    }
}